package com.md.controller;

import com.md.entity.DeptInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DeptController {
    @RequestMapping("/t1")
    public String aa(){
        return "index.jsp";
    }
    @RequestMapping(value = "t2",produces = "text/html;charset=utf-8")
    @ResponseBody
    public String bb(){
        return "as";
    }
    @RequestMapping(value = "t3",produces = "text/html;charset=utf-8")
    @ResponseBody
    public String t3(){
        return "{\"did\":\"3\"}";
    }
    @RequestMapping("/getDept")
    @ResponseBody
    public DeptInfo getDept(){
        return new DeptInfo(1,"aaa");
    }
}
